package com.eimf.saf.security.dao;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.eimf.saf.base.dao.BaseDao;
import com.eimf.saf.security.entity.OrganizeOperationLogDTO;

/**
 * @author eden
 * @date 2013-11-27 上午10:49:42
 * @Description: TODO(这里用一句话描述这个类的作用)
 */
@Repository
public class OrganizeOperationLogDao extends BaseDao<OrganizeOperationLogDTO>
{
    public void addLog(final HashMap<String, Object> param)
    {
        this.getSqlMapClientTemplate().insert("OrganizeOperationLogMap.insertOperationLog", param);
    }

    public int findPasswordErrorTimes(final String paramString)
    {
        return (Integer) this.getSqlMapClientTemplate().queryForObject(
                "OrganizeOperationLogMap.queryPasswordErrorTimesByStaffId", paramString);
    }

    @SuppressWarnings("unchecked")
    public List<OrganizeOperationLogDTO> findLog(final HashMap<String, Object> param)
    {
        return this.getSqlMapClientTemplate().queryForList("OrganizeOperationLogMap.queryOperationLog", param);
    }

}
